package com.andnnl.fileanalysis;

import java.util.List;

/**
 * 用于计算总行数
 * Created by chenss on 2022/1/4.
 */
public class CountListener implements AnalysisListenerBase {
    private long count;

    @Override
    public void invoke(List<String> row) {
        count++;
    }

    @Override
    public void invokeBatch(List<List<String>> rowList) {
        count+=rowList.size();
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }
}
